package com.wy.service.impl.wy;

import com.wy.bean.ParkBean;
import com.wy.dao.ParkMapper;
import com.wy.model.sys.ParkEntity;
import com.wy.service.wy.ParkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("parkServiceImpl")
public class ParkServiceImpl implements ParkService{
    @Autowired
    private ParkMapper parkMapper;
    @Override
    public void insertPark(ParkEntity parkEntity) {
        parkMapper.insert(parkEntity);
    }

    @Override
    public void deletePark(List<String> groupId) {
        parkMapper.deleteByPrimaryKeys(groupId);
    }

    @Override
    public void updatePark(ParkEntity parkEntity) {
        parkMapper.updateByPrimaryKey(parkEntity);
    }

    @Override
    public List<ParkBean> parkList(int pageSize, int start, String type, String status, String residenceId,String parkName) {
        return parkMapper.parkList(pageSize,start,type,status,residenceId,parkName);
    }

    @Override
    public int parkSize(int pageSize, int start, String type, String status, String residenceId, String parkName) {
        return parkMapper.parkSize(pageSize,start,type,status,residenceId,parkName);
    }


    @Override
    public List<ParkBean> getParkByResidenceId(String residenceId) {
        return parkMapper.getParkByResidenceId(residenceId);
    }

}
